<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <link rel="stylesheet" href="/css/reset.css">
    <link rel="stylesheet" href="/css/signin.css">
    <link rel="stylesheet" href="/css/tabbar.css">
    <script src="/js/base.js"></script>
  </head>
  <body>
    <div class="signin">
      <div class="avtor">
        <label for="avtor_input">
          <div class="img"><img src="/assets/signin_avtor.png"></div>
          <div>
            <span>点击上传头像</span>
          </div>
          <input type="file" class="file" id="avtor_input">
        </label>
      </div>
      <form class="form">
        <div class="form-item">
          <div class="form-label">姓名</div>
          <div class="form-content">
            <input type="text" class="input">
          </div>
        </div>
        <div class="form-item">
          <div class="form-label">手机</div>
          <div class="form-content">
            <input type="text" class="input">
          </div>
        </div>
        <div class="form-item">
          <div class="form-label">验证码</div>
          <div class="form-content">
            <input type="text" class="input">
            <button type="button" id="code">获取验证码</button>
          </div>
        </div>
        <div class="form-item">
          <div class="form-label">职务</div>
          <div class="form-content">
            <input type="text" class="input">
          </div>
        </div>
        <div class="form-item" style="padding-top: 0.2rem;">
          <div class="form-label">品牌</div>
          <div class="form-content" style="border: none">
            <label class="radio" for="zhongling">
              <input name="types" type="radio" id="zhongling">
              <span>中凌</span>
            </label>
            <label class="radio" for="airuide">
              <input name="types" type="radio" id="airuide">
              <span>爱瑞德</span>
            </label>
          </div>
        </div>
        <div class="form-item">
          <div class="form-label">门店名称</div>
          <div class="form-content">
            <input type="text" class="input">
          </div>
        </div>
        <div class="form-item">
          <div class="form-label">门店地址</div>
          <div class="form-content">
            <input type="text" class="input">
          </div>
        </div>
        <input type="submit" class="form-submit" value="注册">
      </form>
    </div>
    <script>
      var leftTime = 0
      document.getElementById('code').addEventListener('click', function() {
        if (leftTime === 0) {
          leftTime = 60
        } else {
          return
        }
        var _this = this
        function getTime() {
          setTimeout(() => {
            if (leftTime > 0) {
              leftTime -= 1
              _this.innerText = leftTime + 's'
              getTime()
            } else {
              _this.innerText = '获取验证码'
            }
          }, 1000)
        }
        getTime()
      })
    </script>
  </body>
</html>
